table.insert(itemActions,
	function(item, action)
		-- MAGIC rings
		-- see: dir .. "readme.txt" for information regarding these variables
		local priority = 4
		local identify = true
		local dump = true

		if not (item.quality == ItemQuality.Magic and item.baseItem.code == "rin") then
			return false
		elseif action == aPICK and (not item.flags.Identified or isGoodMagicRing(item)) then
			return priority
		elseif action == aIDENT then
			return identify
		elseif action == aSELL and item.flags.Identified and not isGoodMagicRing(item) then
			return true
		elseif action == aDUMP and item.flags.Identified and not isGoodMagicRing(item) then
			return dump
		end

		return false
	end
)

function isGoodMagicRing(item)
	-- so many good magic rings!!! >.<
	return (
		   findStat(item, "Magic Find") >= 38 or -- 38-40% mf ring
           hasRes(item, 15, 4) or -- 15 allres ring
           hasRes(item, 28, 2) -- 28-30 to 2 resists ring
		   )
end


--[[
Prefixes    alvl clvl freq   name
----------------------------------------------------------------------
Fortuitous	12	 8	  4		11-15% Magic Find (when stacked with suffix)
Bahamut's	45	 37	  2		91-120 to Mana
Scintillat	67	 59	  2		2-15% to each Resistance
Cobalt		18	13	  3		Cold-Resist +21% to +30%
Coral		18	13	  3		Lightning-Resist +21% to +30%
Garnet		18	13    3		Fire-Resist +21% to +30%
Jade		18	13	  3		Poison-Resist +21% to +30%




Suffixes      alvl clvl freq   name
---------------------------------------------------------------------
of Apprentice	5	3	6	+10% Faster Cast Rate
of Performance	81	73	4	+10 to +13 Minimum Damage
of Perfection	75	67	3	+16 to +20 to Dexterity
of the Mammoth	68	60	3	+31 to +40 to Life
of Fortune		42	31	4	+16% to +25% Magic Find(when stacked with same prefix)
of Wizardry		41	33	3	+16 to +20 to Energie
of the Lamprey	77	65	4	+7% to +8% Life stolen per Hit
of the Titan	74	66	3	+16 to +20 to Strength






]]--